<?php

declare(strict_types=1);

namespace app\Controller\WebApi\v1;

use App\Controller\AbstractController;
use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\Controller;
use Service\FeedBackService\FeedBackService;
/**
 * 客服系统接口数据
 * @author Luoshumai
 * @Controller(prefix="/webapi/v1/custom")
 */
class CustomController extends AbstractController
{
    /**
     * Inject()
     * @var FeedBackService
     */
    protected $feedbackService;
    /**
     * 意见反馈
     * @RequestMapping(path="feedBack", methods="post")
     */
    public function feedBack(RequestInterface $request)
    {
        return $this->feedbackService->feedBack(
            (string)$request->input('title'),
            (string)$request->input('content'),
            (string)$request->input('pic'),
            (string)$request->input('mobile'),
            (string)$request->input('email'),
            (int)$request->input('mn_sid'),
            28327
        );
    }
}
